(function() {
    'use strict';

    angular
        .module('milkbeeApp')
        .controller('LeaguerDetailController', LeaguerDetailController);

    LeaguerDetailController.$inject = ['$scope', '$rootScope', '$stateParams','previousState', 'entity', 'Leaguer'];

    function LeaguerDetailController($scope, $rootScope, $stateParams,previousState, entity, Leaguer) {
        var vm = this;

        vm.leaguer = entity;
        vm.previousState = previousState.name;

        var unsubscribe = $rootScope.$on('milkbeeApp:leaguerUpdate', function(event, result) {
            vm.leaguer = result;
        });
        $scope.$on('$destroy', unsubscribe);
        
    }
})();
